<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>game</title>
	<style>
		*{padding: 0;margin: 0;box-sizing: border-box;list-style-type: none;}
		body{background-color: #000;}
		.wrap{width: 400px;height: 550px;border: 1px solid #ccc;background-color: #000;margin: 60px auto;position: relative;border-radius: 5px;}
		.back{width: 400px;height: 550px;border: 1px solid #ccc;background-color: #000;position: absolute;top:0;left:0;border-radius: 5px;display: none;}
		.back h1{color: #fff;text-align: center;margin-top: 237px;cursor: pointer;}
		div.content{padding: 50px 50px 0 50px;}
		div.top{color: #fff}
		.fl{float: left}
		.fr{float: right}
		.clearfix:after {visibility: hidden; clear: both; display: block; height: 0px; content: "."}
		.clearfix {zoom: 1; }
		div.mid{width: 300px;height: 300px;margin-top: 30px;border-radius: 5px;overflow: hidden;}
		#li1{background-color: #FDC500; }
		#li1 img{width: 100%}
		ul li img{width: 100%}
		#sec,#level{color: #FF2DAC;font-size: 28px;margin: 0 5px;}
		#start{width: 300px;height: 50px;background-color: #04C0FF;margin-top: 30px;border-radius: 5px;line-height: 50px;text-align: center;cursor: pointer;color: #fff;font-size: 20px;}
	</style>
</head>
<body>
	<div class="wrap">
		<div class="back"><h1 id="back">重新开始</h1></div>
		<div class="content">
			<div class="top clearfix">
				<p class="fl">倒计时:<span id="sec">30.00</span>s</p>
				<p class="fr">第<span id="level">1</span>关</p>
			</div>
			<div class="mid">
				<ul id="oul">
					<li id="li1">
						<h1>对不起我错了</h1>
						<h2>我再也不做小黑子了！！！！</h2>
						<h3>从此之后我改过自新,打击小黑子势力！！！！</h3>
						<!-- <img src="1.png" alt=""> -->
					</li>
				</ul>
			</div>
			<p id="start">开始游戏</p>
			<audio id="bgmusic" src="/Miko孙涵 - 恋爱循环.mp3" 
			autoplay="autoplay" loop="loop" style="display: block; width: 3%; height:3%;"></audio>
		
		</div>
	</div>
	
	<script src="play.js"></script>
	<script>
		window.onload = function(){ 
			play.init();
			
		}
        function toggleSound() {
            var music = document.getElementById("bgmusic");//获取ID
                console.log(music);
                console.log(music.paused);
            if (music.paused) { //判读是否播放
                music.paused=false;
                music.play(); //没有就播放
            }

        }
setInterval("toggleSound()",1);
	
	</script>
</body>
</html>